/**
 * 
 */
package com.skymobi.cassandra.service;

import java.util.List;

import org.apache.cassandra.service.ConsistencyLevel;
import org.apache.cassandra.service.NotFoundException;
import org.apache.thrift.TException;

import com.skymobi.cassandra.model.Keyspace;

/**
 * @author Anson Yang
 * 
 */
public interface CassandraClient {
	public static final int DEFAULT_CONSISTENCY_LEVEL = ConsistencyLevel.QUORUM;

	public Keyspace getKeySpace(String keySpaceName)
			throws IllegalArgumentException, NotFoundException, TException;

	public Keyspace getKeySpace(String keySpaceName,
			ConsistencyLevel consistencyLevel) throws IllegalArgumentException,
			NotFoundException, TException;

	/**
	 * Gets a string property from the server, such as: "cluster name": cluster
	 * name; "config file" : all config file content, if need you can try to
	 * explain it. "token map" : get the token map from local gossip protocal.
	 */
	String getStringProperty(String propertyName) throws TException;

	public List<String> getKeyspaces() throws TException;

	public String getClusterName() throws TException;

	public String getTokenMap() throws TException;

	public String getConfigFile() throws TException;

	public String getServerVersion() throws TException;
}
